<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="HaarClassifier,com.suckatmath.detector.classifier.HaarClassifier,height,inv_window_area,origheight,origwidth,stages,width,evaluateSubImage,fromXML,setScale,toXMLString" name="keywords">
<title>com.suckatmath.detector.classifier.HaarClassifier</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'HaarClassifier - API Documentation';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">ObjectDetector</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/suckatmath/detector/classifier/HaarClassifier.html&amp;com/suckatmath/detector/classifier/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;HaarClassifier</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class HaarClassifier"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.suckatmath.detector.classifier</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class HaarClassifier</td>
</tr>
</table>
<p></p>
 HaarClassifier is the top level of a Haar Classifier.  It has a native width and height and several stages.
 Corresponds to <... type_id="opencv-haar-classifier">
 
 <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#height">height</a> : int<div class="summaryTableDescription">
   height in pixels
   </div>
</td><td class="summaryTableOwnerCol">HaarClassifier</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#inv_window_area">inv_window_area</a> : Number<div class="summaryTableDescription">
   inverse window area.</div>
</td><td class="summaryTableOwnerCol">HaarClassifier</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#origheight">origheight</a> : int<div class="summaryTableDescription">
   original height (before any scaling)
   </div>
</td><td class="summaryTableOwnerCol">HaarClassifier</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#origwidth">origwidth</a> : int<div class="summaryTableDescription">
   original width (before any scaling)
   </div>
</td><td class="summaryTableOwnerCol">HaarClassifier</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#stages">stages</a> : Array<div class="summaryTableDescription">
   Array of HaarClassifierStage
   </div>
</td><td class="summaryTableOwnerCol">HaarClassifier</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#width">width</a> : int<div class="summaryTableDescription">
   width in pixels
   </div>
</td><td class="summaryTableOwnerCol">HaarClassifier</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#HaarClassifier()">HaarClassifier</a>(w:int = 0, h:int = 0)</div>
<div class="summaryTableDescription">
   Create a new classifier.</div>
</td><td class="summaryTableOwnerCol">HaarClassifier</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#evaluateSubImage()">evaluateSubImage</a>(ii:<a href="IntegralImage.html">IntegralImage</a>, r:Rectangle):Boolean</div>
<div class="summaryTableDescription">
     iteratively evaluates stages.</div>
</td><td class="summaryTableOwnerCol">HaarClassifier</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#fromXML()">fromXML</a>(xml:XML):<a href="../classifier/HaarClassifier.html">HaarClassifier</a>
</div>
<div class="summaryTableDescription">[static]
   reads a HaarClassifier from an XML file.</div>
</td><td class="summaryTableOwnerCol">HaarClassifier</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setScale()">setScale</a>(r:Rectangle):void</div>
<div class="summaryTableDescription">
   scales this classifier from width height to r.</div>
</td><td class="summaryTableOwnerCol">HaarClassifier</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toXMLString()">toXMLString</a>():String</div>
<div class="summaryTableDescription">
   serialize this classifier to an XML string suitable for writing to a file.</div>
</td><td class="summaryTableOwnerCol">HaarClassifier</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="height"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">height</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var height:int</code><p>
   height in pixels
   </p></div>
<a name="inv_window_area"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">inv_window_area</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var inv_window_area:Number</code><p>
   inverse window area.  1/(width times height).  Used for normalization
   </p></div>
<a name="origheight"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">origheight</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var origheight:int</code><p>
   original height (before any scaling)
   </p></div>
<a name="origwidth"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">origwidth</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var origwidth:int</code><p>
   original width (before any scaling)
   </p></div>
<a name="stages"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">stages</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var stages:Array</code><p>
   Array of HaarClassifierStage
   </p></div>
<a name="width"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">width</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var width:int</code><p>
   width in pixels
   </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="HaarClassifier()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">HaarClassifier</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function HaarClassifier(w:int = 0, h:int = 0)</code><p>
   Create a new classifier.  Usually you won't use this, instead reading from XML using the fromXML method
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">w</span>:int</code> (default = <code>0</code>)<code></code> &mdash;  native width in pixels.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">h</span>:int</code> (default = <code>0</code>)<code></code> &mdash;  native height in pixels.
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="evaluateSubImage()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">evaluateSubImage</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function evaluateSubImage(ii:<a href="IntegralImage.html">IntegralImage</a>, r:Rectangle):Boolean</code><p>
     iteratively evaluates stages.  Passes if ALL stages pass.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">ii</span>:<a href="IntegralImage.html">IntegralImage</a></code> &mdash; - IntegralImage
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">r</span>:Rectangle</code> &mdash; - window on which to evaluate.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; true if ALL stages pass.  false otherwise.
   </td>
</tr>
</table>
</div>
<a name="fromXML()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">fromXML</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function fromXML(xml:XML):<a href="../classifier/HaarClassifier.html">HaarClassifier</a></code><p>
   reads a HaarClassifier from an XML file.  Several such files are provided by the Intel OpenCV project.  This class intends to be
   compatible with those files, but is NOT associated with the OpenCV project.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">xml</span>:XML</code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../classifier/HaarClassifier.html">HaarClassifier</a></code> &mdash; 
                        HaarClassifier described by the xml
   
                        
                     </td>
</tr>
</table>
</div>
<a name="setScale()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setScale</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setScale(r:Rectangle):void</code><p>
   scales this classifier from width height to r.
   Does so by scaling all rectangle features in subtrees.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">r</span>:Rectangle</code> &mdash; window to scale to.
   </td>
</tr>
</table>
</div>
<a name="toXMLString()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toXMLString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function toXMLString():String</code><p>
   serialize this classifier to an XML string suitable for writing to a file.  Should be compatible with OpenCV, but not identical.
   some nodes which OpenCV represents as "_" are more verbose.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; String
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
